package ControlLayer;
import ModelLayer.LoanContainer;
import java.util.Iterator;

public class LoanCtr{
    
    private LoanContainer loanCtr;
    private static LoanCtr instance = null;
    
    private LoanCtr() { loanCtr = new LoanContainer();}  
    public static LoanCtr getInstance() { if(instance==null) instance = new LoanCtr();  return instance; }
    
    
    public boolean addLoan(long idP, long idD, int daysToBorrow) {  return loanCtr.addLoan(idP, idD, daysToBorrow);  }
    public boolean changeState(long idP, long idD, String serialNo) { return loanCtr.changeState(idP, idD, serialNo); }
    
    public Iterator getLoans() { return loanCtr.getLoans(); }
    
    
}